package main

import (
	"SupperControl/protocol/TCP"
)

type Tsub struct {
	A int8
	B int32
	S string
	M map[int32]string
}

type TTest struct {
	A   int8
	B   int32
	S   string
	Ar  [5]string
	Ar1 []int8
	Sub Tsub
}

func main() {
	//t := TTest{
	//	A:   10,
	//	B:   12345,
	//	S:   "abcde",
	//	Ar:  [5]string{"111", "222", "333", "444", "555"},
	//	Ar1: []int8{1, 2, 3, 4, 5, 6},
	//	Sub: Tsub{
	//		A: 1,
	//		B: 200,
	//		S: "11111111111",
	//		M: map[int32]string{1: "abc", 2: "bbb", 3: "xxx"},
	//	},
	//}
	//
	//var b []byte
	//xx := bytes.NewBuffer(b)
	//err := utils.WriteStruct(xx, t, binary.LittleEndian)
	//if err != nil {
	//	println(err.Error())
	//}
	//var yy TTest
	//utils.ReadStruct(xx, &yy, binary.LittleEndian)

	TCP.StartTCPSvr(":8081")
}
